package oa.hleast.xswl.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;
import oa.hleast.common.base.BaseCodeEnum;

/**
 * @author 00209
 * @desc 订单来源类型枚举
 * @email dz@hleast.com
 * @Date 2021/03/01 22:01:45
 */
@ToString
@AllArgsConstructor
public enum OrderSourceEnum implements BaseCodeEnum {

    WEB(0), // PC订单
    APP(1), // APP订单
    ;

    @Getter
    private Integer code;

    public static OrderSourceEnum getValue(Integer code){
        for (OrderSourceEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
